package com.itheima.mybatisplus.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

//@TableName("tb_user")//指定表名
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class User {
    //@TableId(type = IdType.AUTO)//主键自增
    private Long id;
    private String userName;
    private String password;
    private String name;
    private Integer age;
    private String email;

    @Override
    public String toString() {
        return "\n"+"User{" +
                "id=" + id +
                ", userName='" + userName + '\'' +
                ", password='" + password + '\'' +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", email='" + email + '\'' +
                '}';
    }
}